Method of displaying structures three-dimensionally

ABSTRACT

A method of displaying a structure (SML) three-dimensionally, in which a rectangular parallelepiped (RP), having on each of its sides distances (L x , L y , L z ) between minimum and maximum positions along each axis of a structure (SML) is constituted by a set of a number of unit solids, e.g., unit cubes (UC), of the same shape and same dimensions. The structure is represented by information indicating whether each unit solid is part of the structure (SML). Individual ones of the unit solids constituting the structure (SML) are displayed in order starting from unit solids seen on a the front side of the structure. The face of a unit solid overlapping a face of a unit solid already displayed is not displayed; instead, only the visually foremost faces thereof are displayed, thereby displaying a perspective view of the three-dimensional structure (SML).

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to a three-dimensional display method for structures and, more particularly, to a display method through which structures can be displayed in three dimensions in a simple manner without complicated computations.

2. Description of the Related

With the strides that have been made in computer graphics, a variety of methods of displaying various structures three-dimensionally have been proposed and put into practice in recent years. In these conventional three-dimensional display methods, a structure generally is expressed by an internal model capable of being recognized mathematically.

For this reason, a three-dimensional display of a structure in the prior art requires a large number of calculations, thereby necessitating a costly apparatus capable of processing at high speeds. However, a conversational-type numerical control (NC) apparatus or NC automatic programming apparatus cannot be provided with a high-speed processing function for reasons of cost. At best, these apparatus can be equipped with microprocessors of the type presently in general use. In consequence, an enormous amount of processing time is needed to display a structure three-dimensionally, thus making it impossible to achieve the display rapidly. Thus, the conventional methods are impractical.

In a conversational-type NC apparatus or NC automatic programming apparatus, whether or not machining will be performed correctly based on originated NC data need only be verified by the three-dimensional display of the workpiece, thus making it unnecessary to graphically portray the workpiece with high precision.

SUMMARY OF THE INVENTION

The present invention has been devised in view of the foregoing points and its object is to provide a display method through which a structure can be displayed three-dimensionally at high speed by a comparatively inexpensive apparatus.

In a method of displaying a structure three-dimensionally according to the present invention, a rectangular parallelepiped having, as each of its sides, distances L_(x), L_(y), L_(z) between minimum and maximum positions along each axis of a structure is constituted by a set of a number of unit solids, e.g., unit cubes, of the same shape and same dimensions, and the structure is expressed by information indicating whether each unit solid is part of the structure. Individual ones of the unit solids constituting the structure are displayed in order starting from unit solids seen on a foremost side of the structure, and the face of a unit solid overlapping a face of a unit solid already displayed is not displayed; instead, only the visually foremost faces thereof are displayed, thereby displaying a perspective view of the three-dimensional structure. It can be arranged so that the faces of the unit solids are displayed in colors different from one another so as to render them distinguishable, and so that those faces of the unit solids lying in the same plane are displayed in the same color, thus making it possible for the faces of the overall structure to be visually distinguished from one another.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a system for practicing the method of the present invention;

FIG. 2 is a perspective view of a structure;

FIG. 3 is a perspective view of the structure divided into unit cubes;

FIG. 4 is a view for describing the display color of each of the faces of a unit cube;

FIGS. 5(a(-5(d) are three-dimensional views for describing the order in which the unit cubes are displayed in the present invention;

FIGS. 6(a)-5(c) are three-dimensional vies for describing a method of generating a paint graphic;

FIG. 7 is a two-dimensional view for describing logical operations for the purpose of generating paint graphics; and

FIG. 8 is another three-dimensional view of paint graphic generation.

DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 is a block diagram of a system for practicing the method of the present invention. Numeral 11 denotes a host, and numeral 12 denotes a graphic display unit having a display processor 12a, an image data memory (e.g., a RAM) 12b for storing image data, a color cathode-ray tube (CRT) 12c, and a frame buffer 12d having a storage area for the picture elements of the CRT. Frame buffers 12d are prepared for the colors red, blue and green, respectively, though these are not shown. RBF denotes a buffer for red, BBF a buffer for blue, and GBF a buffer for green.

The host 11 obtains a rectangular parallelepiped RP having, as respective ones of its sides, distances (L_(x), L_(y), L_(z)) between minimum and maximum positions along each axis of a structure SML, as shown in FIG. 2, then divides the rectangular parallelepiped RP into a number of unit solids (e.g., unit cubes) UC of the same shape and same dimensions, as shown in FIG. 3; originates data indicating whether each unit solid UC constitutes the structure SML. Image data necessary for displaying the structure SML on the CRT is supplied in accordance with the abovementioned data. Included are position data relating to the rectangular parallelepiped RP and color data relating to the faces of the solids; method of projection (orthogonal axonometric projection, conformal projection, etc.) is determined by the host 11 which transmits the data. The method of projection in the illustrated example is one (conformal) in which the right-hand perspective illustration of the structure SML is displayed, as shown in FIG. 3. The upper face A (see FIG. 4) of each unit cube UC is displayed in the color blue, the front face B in the color red, and the right-hand face in the color green. The corner lines of the structure SML are displayed in a color different from the colors of the cube faces, and the background is displayed in a color different from those of the corner lines and faces.

When the host 11 transmits the image data, the display processor 12a in the graphic display unit 12 stores the image data in the memory 12b. Thereafter, the display processor 12a generates the images of individual ones of those unit cubes UC constituting the structure SML in order starting from those cubes seen nearer the front of the structure, stores these images in the frame buffer 12d and displays them on the CRT 12c. More specifically, display starts from the unit cubes having the largest X-axis coordinate. With regard to rows and columns of the unit cubes having the same X-axis coordinate, the unit cubes are displayed in order starting from those having the largest Y-axis coordinate. With regard to columns of unit cubes having the same Y-axis coordinate, the unit cubes are displayed in order starting from that having the largest Z-axis coordinate. As a result, the images of the unit cubes are generated in the frame buffer 12d and displayed on the CRT in the order of the numbers shown in FIG. 5(a).

Thereafter, the above-described processing is performed with regard to the unit cubes having the next largest X-axis coordinate, so that the image shown in FIG. 5(b) is stored in the frame buffer 12d and displayed on the CRT 12c. Similar processing is then performed to display the image shown in FIG. 5(c) on the CRT. Finally, the perspective illustration of the structure shown in FIG. 5(d) is stored in the frame memory 12d and displayed on the CRT 12c.

When the images of individual unit cubes constituting the structure SML are stored in the frame buffer 12d and displayed in order starting from those unit cubes nearer the front of the structure, as described above, the face of a subsequent unit cube overlapping a face of a unit cube already displayed is not displayed; only the visually forward faces are displayed. For example, if the image of a unit cube UC1 shown in FIG. 6(a) is stored in the frame buffer 12d (with the paint image of top face A being stored in the blue buffer BBF, the paint image of the front face B in the red buffer RBF and the paint image of the right-hand face C in the green buffer GBF) and then the image of another unit cube UC2 shown by the dashed lines in FIG. 6(b) is generated, the paint images of the unit cube UC1 already displayed are displayed preferentially. Accordingly, with regard to the faces where the unit cube UC1 and next unit cube UC2 overlap [see the shaded portion in FIG. 6(b)], the paint images of the unit cube UC1 already displayed remain intact, and the paint images of the next unit cube UC2 are generated only on the faces thereof not overlapped [see the dotted portions in FIG. 6(b)]. As a result, combined paint images are stored in the frame buffer 12d and displayed on the CRT 12c as shown in FIG. 6(c).

In order to thus preferentially display paint images already displayed (i.e., paint images that have been stored in the frame buffer 12d) and display paint images of the next unit cube only with regard to faces thereof not overlapped, the display processor 12a performs the logical operations set forth hereinbelow.

Specifically, the following logical operations are performed for every blue, red and green paint image with respect to each picture element in the frame buffer 12d within a range in which the next unit cube is displayed:

    R.sub.x =R.sub.C +(*G.sub.C.*B.sub.C).R.sub.N

    G.sub.x =G.sub.C +(*B.sub.C.*R.sub.C).G.sub.N

    B.sub.x =B.sub.C +(*R.sub.C.*G.sub.C).B.sub.N

The operational results R_(x), G_(x), B_(x) are stored in the storage areas of the red buffer RBF, green buffer GBF and blue buffer BBF, respectively corresponding to the picture elements. It should be noted that the symbol "*" signifies negation. Further,

R_(C) represents pixel data in the red buffer and indicative of a graphic already displayed, e.g., UC1;

G_(C) represents pixel data in the green buffer and indicative of a graphic already displayed, e.g., UC1;

B_(C) represents pixel data in the blue buffer and indicative of a graphic already displayed, e.g., UC1;

R_(N) represents pixel data relating to red in the next displayed unit cube, e.g., UC2;

G_(N) represents pixel data relating to green in the next displayed unit cube, e.g., UC2;

B_(N) represents pixel data relating to blue in the next displayed unit cube, e.g., UC2;

R_(x) represents the result of the logical operation stored as image data in the red buffer to produce the graphic displayed next;

G_(x) represents the result of the logical operation stored as image data in the green buffer to produce the graphic displayed next; and

B_(x) represents the result of the logical operation stored as image data in the blue buffer to produce the graphic displayed next.

FIG. 7 is a chart for describing the foregoing logical operations. The upper most section provides three-dimensional the graphic already displayed on the left (B represents blue, R red and G green), the unit cube graphic to be displayed next in the middle , and the display graphic based on the results of the logical operations on the right. The remaining sections indicate the contents of the frame buffers. The left column corresponds to the image data R_(C), G_(C), B_(C) of the already displayed graphic, the middle column corresponds to the image data R_(N), G_(N), B_(N) of the unit cube, e.g., UC2 to be displayed next, and the right column corresponds to the image data R_(x), G_(x), B_(x), namely the results of the logical operations. The row from top to bottom correspond to the red frame buffer RBF, green frame buffer and blue frame buffer, respectively.

In accordance with the foregoing, with regard to the unit cube UC bounded by the bold solid line as shown in FIG. 8, a unit cube UCL which contacts the left side of unit cube UC has the paint images of its top and front faces displayed, a unit cube UCB which contacts the bottom face of unit cube UC has the paint images of its front and right-hand faces displayed, and a unit cube UCO which contacts the opposite (rear) face of unit cube UC has the paint images of its top and right-hand faces displayed.

Though a case has been described above in which the structure is expressed as a set of unit cubes, expression is possible as rectangular parallelepipeds, triangular prisms and the like as unit solids. Further, though a case is described in which the faces of the unit cubes are displayed in the three primary colors of red, blue and green, the faces can be displayed in colors other than these three primary colors, and different patterns can be applied to the various faces so that each face can be displayed in a manner distinguishable from the others.

In accordance with the present invention as described above, a rectangular parallelepiped having, on each of its sides, distances between minimum and maximum positions along each axis of a structure is constituted by a set of a number of unit solids A structure is expressed by information indicating whether each unit solid is part of the structure. Individual ones of the unit solids constituting the structure are displayed in order starting from unit solids seen on a the front side of the structure. The face of a unit solid overlapping a face of a unit solid already displayed is not displayed; instead, only the visually foremost faces thereof are displayed. This makes it possible to three-dimensionally display a structure at high speed by means of a comparatively inexpensive apparatus. 

What is claimed is:
 1. A method of displaying a structure three-dimensionally, comprising the steps of:(a) forming, using a set of unit solids having faces with identical shapes and dimensions, a rectangular parallelepiped having, as respective ones of its sides, distances between minimum and maximum positions along each axis of a structure, and expressing the structure by information indicating whether each unit solid constitutes said structure; (b) displaying individual ones of the unit solids constituting said structure in order, starting from the unit solids seen on a foremost side of the structure, in dependence upon a predetermined projection method displaying first, second and third faces of each unit solid using first, second and third colors, respectively, by:(b1) storing a first color image, a second color image and a third color image in a first frame buffer, a second frame buffer and a third frame buffer, respectively, and (b2) combining the first, second and third color images stored in the first, second and third frame buffers to display a three-dimensional image of the structure; and (c) refraining from displaying a face of each unit solid overlapping the face of an already displayed unit solid, and displaying only visually foremost faces thereof, thereby displaying the structure three-dimensionally.
 2. A method of displaying a structure three-dimensionally according to claim 1, wherein the first, second and third colors are respectively red, green and blue.
 3. A method of displaying a structure three-dimensionally according to claim 2, further comprising the step of (d) repeating logical operations with regard to image data for each unit solid, to generate final red, green and blue images, the logical operations including:

    R.sub.x =R.sub.C +(*G.sub.C.*B.sub.C).R.sub.N

    G.sub.x =G.sub.C +(*G.sub.C.*R.sub.C).G.sub.N

    B.sub.x =B.sub.C +(*R.sub.C.*G.sub.C).B.sub.N

where * signifies negation, R_(C) represents pixel data in the red frame buffer and indicative of a graphic already displayed; G_(C) represents the pixel data in the green frame buffer and indicative of the graphic already displayed; B_(C) represents the pixel data in the blue frame buffer and indicative of the graphic already displayed; R_(N) represents the pixel data relating to red in a next graphic to be displayed; G_(N) represents the pixel data relating to green in the next graphic; B_(N) represents the pixel data relating to blue in the next graphic; R_(x) represents the image data in the red frame buffer of a resulting graphic displayed next; G_(x) represents the image data in the green frame buffer of the resulting graphic; and B_(x) represents the image data in the blue frame buffer of the resulting graphic. 